home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-04
/
422mods.zip
/
DAWG09A.422
< prev
next >
Wrap
Text File
|
1993-02-09
|
11KB
|
260 lines
1[2DAWG09B.MOD1] 0Ansi Logon Mod
Dawg #1 @13498
Thu Feb 04 21:03:35 1993
╔══════════════════════════════════════════════════════════════════════════╗
║ MOD :DAWG09A.MOD - ANSI Logon ║
║ DATE :01/27/93 ║
║ USAGE :WWIV 4.22 ║
║ VERSION :1.30 ║
║ Descrip.:Ansi logon mod. ║
║ Diff. :4 (on a scale of 1-10, 1 being easy) ║
║ Author :6Dawg0 116@134722/116@1134980 ║
║ BBS :6Thunder2world0 ║
║ Thanx to:4Fish7Bone0 of 7Star4Base0 4Fish7Bone0 (3478 net/13454 link) ║
║ for beta testing this mod and for his countless suggestions ║
║ some of which were implemented. ║
║ 1Tolkien0 of the 1Fellowship0 (3456 net) for writing up ENHANCE.C. ║
║ and for his suggestions for improvement. ║
║ 4Sam0 (2177 net) for helping me debug the ansi problems. ║
╚══════════════════════════════════════════════════════════════════════════╝
This mod is based on Tolkien's snazzy logon procedure. For those of you
who haven't ever had the pleasure of logging onto the Fellowship (@3456),
he has a dos type logon. After you get past that, this nice ansi box
pops up and the user enters his/her information to logon. Well I wrote
an ansi type logon a while back (Dawg07.mod), but never got around to
writing it up and releasing it because of two reasons. Number one, it was
a pain in the ass to install, and number two, because it was such a pain
to install, I dreaded writing it up. However, when Tolkien released
ENHANCE.C it sent me back to the source code. I redid the logon using
some of the nice functions from that file and here is the result.
One of the "side effects" of this mod is that it also will print out the
first six digits of the users phone number instead of XXX-XXX-. Nothing
major, just a nice cosmetic thing.
I have updated this to do two things. Number one is that it handles the
topscreen for you. It notes what it is set for, toggles it off during a user
logon, and replaces it like it was. This was Tolkien's idea, and I really
like it much better. This mod also FORCES the ansi box on all callers, so
if you have many non-ansi users, you may not want to use this. The mod notes
if the user has ansi, if not, it sets their ansi status on, and then when the
logon is complete, it turns it back off. Again, Tolkien's suggestion, but I
didn't implement it until Sam brought to my attention the problems with
some high speed modems and WWIV not sensing ansi for them.
NOTE: You MUST have ENHANCE.C installed to make use of this mod. This mod
relies on several functions included in that file. So if you want to
use this mod, you need to get ahold of ENHANCE.C. If you don't have
this file, it can be found on most support boards, including Tolkien's
(The Fellowship, @3456 WWIVNet). Current filename for it is ENH110.ZIP.
Well on with the mod. :)
+ New code
- Existing code
* Modified code
@ Deleted code
Step 1:
-------
BACK UP YOUR SOURCE CODE!!!!!!!! This mod only alters LILO.C, but you
should always back up your source code. If something goes wrong or you
don't like the mod, you have something to go back to.
Step 2:
-------
Load up LILO.C. The entire mod is in void getuser. I would like to make
note of something. Change the following code appropriately. Make sure you
pay close attention, as you change a few lines and delete a few in addition
to all the adding:
Add this to the variable declarations at the top of void getuser, it will
be used to show the first six digits of the users phone number:
char stl[13];
int topstatus,hasansi;
then a little ways down, make the following alterations:
- #endif
- if (ans>0)
- printfile("welcome.ans");
- else if (ans==0)
- printfile("welcome.msg");
- } else
- printfile("welcome.msg");
- }
- if (curatr!=7)
- reset_colors();
+ { /*The next 3 lines are courtesy of Ozz/Ruggedo*/
+ thisuser.comp_type=2; /*They force ansi upon everyone, at least*/
+ thisuser.sysstatus |= sysstatus_ansi; /*until they enter their name*/
+ thisuser.sysstatus |= sysstatus_color;
+ }
- do {
- nl();
- if (net_only) {
- pl("This time is reserved for net-mail ONLY.");
- pl("Please try calling back again later.");
* }
@ pl("Enter number or name or 'NEW'");
- outstr("NN: "); /* DON'T change the NN: prompt. */
+ topstatus=topdata;
+ topdata=0;
+ hasansi=0;
+ if (okansi()) { /* but this seemed easier and cleaner */
+ clearscreen();
+ makewin(7,0,30,2,52,4);
+ writebetween(31,51,3,6,"Thunderworld"); /*Fill in your own bbs*/
+ makewin(7,4,22,5,60,10);
+ writeat(23,6,1,"Name :");
+ writeat(23,7,1,"Pword:");
+ writeat(23,8,1,"Phone:");
+ writeat(23,9,0," ");
+ writeat(29,9,5,"Enter Name/Alias or NEW");
+ goxy(29,6);
+ backprint("Handle/Alias",4,20,500);
+ ansic(4);
+ }
- input(s,30);
- usernum=finduser(s);
- if ((net_only) && (usernum!=-2))
- usernum=0;
- if (usernum>0) {
- read_user(usernum,&thisuser);
- read_qscn(usernum,qsc,0);
- actsl = syscfg.newusersl;
+ if (!(thisuser.sysstatus & sysstatus_ansi)) /*These lines fix the */
+ { /*ansi problem, everyone*/
+ hasansi=1; /*gets it now :) */
+ thisuser.sysstatus |= sysstatus_ansi;
+ thisuser.sysstatus |= sysstatus_color;
+ }
- topscreen();
- ok=1;
+ if (okansi()){
+ writeat(29,9,5,"Enter Password ");
+ goxy(29,7);
+ backprint("Password",4,20,500);
+ ansic(4);
+ }
@ outstr("PW: ");
- echo=0;
- input(s,8);
- if (strcmp(s,thisuser.pw)!=0)
- ok=0;
- if ((syscfg.sysconfig & sysconfig_free_phone)==0) {
@ outstr("PH: ###-###-");
+ if (okansi()) {
+ stl[0]=0; /*Clear the garbage out of the variable*/
+ strncat(stl,thisuser.phone,8);
+ writeat(29,8,4,stl);
+ writeat(29,9,5,"Enter Phone Number ");
+ goxy(37,8);
+ backprint("9999",4,20,500);
+ ansic(4);
+ }
- echo=0;
- input(s2,4);
- if (strcmp(s2,&thisuser.phone[8])!=0) {
- ok=0;
- if ((strlen(s2)==4) && (s2[3]=='-')) {
- nl();
- pl("!! Enter the LAST 4 DIGITS of your phone number ONLY !!");
- nl();
- }
- }
- }
* if ((thisuser.sl==255) && (ok)) { /*I made this so all 255's must*/
+ if (okansi()) { /*enter the system PW it's up */
+ writeat(23,9,6,"Sysop:"); /*to your own discretion. */
+ mpl(31);
+ }
@ outstr("SY: ");
- echo=0;
- input(s,20);
+ topdata=topstatus;
- if (strcmp(s,syscfg.systempw)!=0)
- ok=0;
- }
+ if (hasansi==1) /*turn ansi back off for non-ansi users*/
+ {
+ thisuser.sysstatus ^= sysstatus_ansi;
+ thisuser.sysstatus ^= sysstatus_color;
+ hasansi=0;
+ }
- echo=1;
Step 3:
-------
Further down in Lilo.c make the following one line addition. It's just
a cosmetic screen clear to keep the screen nice for new users. I used
Tolkien's clearscreen command from enhance.c for consistency purposes,
but you don't have to do it that way.
- if (usernum==-1) {
+ clearscreen();
- newuser();
- ok=1;
- } else
- if (usernum==0) {
- if (net_only)
Step 4:
-------
Then recompile. Finally, I have released a mod that DOESN'T require a full
recompile. Shouldn't take more than a few seconds to recompile LILO and to
link. Then test it out. Also, I tried to comment what the changes were,
but to clear some stuff up, I sysop remotely, I have two local co-sysops
who have 255's, for security they have to enter the system pw when logging
on. You can choose not to modify that one line and you won't have to do
this, but for most it won't matter as I'm sure most local #1's fast logon
anyway. Well, that should about cover things. I'm quite sure the code
could be done more efficiently and/or cleaner, but what can I say.
It works on at least two systems so....
If you have any problems with this mod, feel free to contact me. My net
address is 1@3472, and my link address is 1@13498. I will do what I can
to help. Oh and one last thing, if anyone does actually use this mod,
I'd appreciate a short note through the net or link telling me that.
Thanks,
6Dawg0
Revision history:
-----------------
1.30 (01/27/93) Well, I went back to WWIV (good riddance VBBS) and
updated this for v4.22. Feel free to externalize the
strings. I did, but I thought it would be easier to leave
that up to each individual sysop.
1.20 (03/23/92) After talking with Sam (1@7106), I decided that to solve
an ansi autodetect problem that high speed modems were
having with this mod I would force it on everyone, without
caring if they have ansi. This was suggested by Tolkien a
while back, but I couldn't get it to work at the time so
I had quit messing with it. Released as Dawg09A.mod.
1.15 (02/13/92) After talking with Tolkien (actually 2way chatting), I
added some code to do the following: turns of topscreen
during the logon, and then restores it to it's prelogon
state.
1.10 (02/10/92) At the urging of Fishbone, I added the status line
at the bottom of the box to show what is being entered.
Actually, it was a good suggestion as I already had the
line sitting there for the sysop PW, and since most users
didn't see that, they just had a blank line, now it gets
used. Fixed a flaw in my logic about the phone number.
Released as Dawg09.mod.
Previous revisions deleted.